package com.check.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.check.dao.ResourceDao;
import com.check.pojo.Resource;
import com.check.pojo.RoResource;

@Repository("reDao")
public class ResourceDaoImpl extends BaseSqlMapDao implements ResourceDao {

	@SuppressWarnings({ "unchecked", "deprecation" })
	public List<Resource> findReList(String rId) {
		
		return  this.getSqlMapClientTemplate().queryForList("Resource.findAllChildByRoid",rId);
	}

	public void addRoRe(RoResource roRe) throws Exception {
		this.insertObject("Resource.insertRoRe", roRe);
	}

	public void removeRoRe(String roId) throws Exception {
		this.deleteObject("Resource.deleteRoReByRoId", roId);
	}

}
